package com.libservice.cacheservice

import com.libbase.cache.CacheInterface

typealias ClearCacheCompletion = (result: Boolean) -> Unit

interface CacheServiceDelegate {
    fun clearCache(completion: ClearCacheCompletion?)
}

interface CacheServiceInterface {
    var delegate: CacheServiceDelegate?

    //全局不可清除
    val globalCache: CacheInterface

    //全局可清除
    val globalRemovableCache: CacheInterface

    //用户不可清除
    val userCache: CacheInterface?

    //用户可清除
    val userRemovableCache: CacheInterface?

    fun clearCache(completion: ClearCacheCompletion?)

    fun setUserCache()
}